<template>
  <div>
    <div style="text-align: left">
      <pre class="hljs" highlightjs><code v-html="highlight"></code></pre>
    </div>
  </div>
</template>
<script>
import hljs from "highlightjs";
import "highlight.js/styles/tomorrow-night-blue.css";
import { defineComponent } from "vue";
//import MarkdownIt from "markdown-it";

export default defineComponent({
  props: {
    textarea: {
      type: String,
      default: "",
    },
  },
  computed: {
    highlight() {
      const result = hljs.highlightAuto(this.textarea);
      return result.value;
    },
  },
});
</script>
